﻿--header AlertReadModel Fix
if (exists(
select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'iComply'
and TABLE_NAME='AlertReadModel'))
BEGIN
Drop table iComply.AlertReadModel
END

GO

 create table iComply.AlertReadModel(
Id int NOT NULL,
[EventDate] DateTime2 not null,
[Type] nvarchar(500) not null,
SecurityId int not null,
SecurityName nvarchar(max) not null,
FundId int not null,
FundName nvarchar(500) not null,

BookId int not null,
BookName nvarchar(500) not null,

MaxHeatScore float not null,
ExcessReturn decimal(19,10) not null,
SigmaMove float not null,
IsAssigned bit not null,

        
CONSTRAINT PK_AlertReadModel PRIMARY KEY (Id)
 )
